<script setup lang="ts">
const emit = defineEmits(['clickShare'])
const visibleShare = ref(false)
const shareFn = (row: any) => {
    console.log('分享')
    visibleShare.value = true
}
const onTap = (e) => {
    console.log(e)
    visibleShare.value = false
    emit('clickShare', e)
}

const items = [
    {
        name: 'wechat',
        color: '#07c160',
        text: '微信好友',
        //v1.9.9+
        openType: 'share'
    }
    // {
    //     name: 'moments',
    //     color: '#44DC6B',
    //     text: '朋友圈',
    //     openType: 'share'
    // }
    // {
    //     name: 'qq',
    //     color: '#3FB7F5',
    //     text: 'QQ'
    // },
    // {
    //     name: 'sina',
    //     color: '#D8070B',
    //     text: '新浪微博'
    // }
]

defineExpose({
    shareFn
})
</script>

<template>
    <fui-share-sheet
        isFull
        padding="48"
        background="#fff"
        lineColor="#eee"
        :show="visibleShare"
        :itemList="items"
        maskClosable
        @cancel="visibleShare = false"
        @click="onTap"
    ></fui-share-sheet>
</template>

<style scoped lang="scss"></style>
